var express = require('express');
var router = express.Router();
var updatefile = require('../middleware/uploadfile')
var position = require('../controller/positionController')
var auth = require('../middleware/Auth')

router.use(auth);

//添加职位信息 /api/position/add
router.post('/add', updatefile, position.add)

//获取职位列表信息 /api/position/list
router.get('/list', position.list)

//获取单条的职位信息 /api/position/findeon/:id
router.get('/findone/:id', position.findone)

//编辑数据的提交 api/position/update
router.post('/update', updatefile, position.update)

//数据的删除 /api/position/del
router.post('/del', position.del)


module.exports = router;